package com.beiding.workordersystem.orders.looporder.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
public class LoopTask {

    private String id;

    private Integer status;

    @TableField(exist = false)
    private String statusName;

    private String linkman;

    private String phone;

    private String company;

    //开始时间
    private Date startTime;

    private Date endTime;

    //直接存字符串
    private String type;

    public void setStatus(Integer status) {
        this.status = status;
        this.statusName = map.get(status);
    }


    private final static Map<Integer, String> map = new HashMap<>();
    static {
        map.put(1, "创建");
        map.put(2, "进行中");
        map.put(3, "到期");
    }
}
